package com.springcloud.order.controller;

import com.springcloud.feign.goodFeignService;
import com.springcloud.feign.stockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class orderController {
    @Autowired
    stockFeignService stockFeignService;
    @Autowired
    goodFeignService goodFeignService;


    @RequestMapping("/add")
    public String add(){
        System.out.println("下单成功");
        String msg = stockFeignService.reduct();
        String s = goodFeignService.get(1);
        return "hello world    " + msg + "      " + s;
    }
}
